package com.lsp.server.user.mapper;

import com.lsp.server.user.domain.po.Org;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @ClassName OrgMapper
 * @Description 域名管理持久层
 * @Author Mr Hao
 * @Date 2021/12/6 11:12
 */
@Mapper
public interface OrgMapper {

    @Select("SELECT * FROM org_scp")
    List<Org> queryOrgList();

    @Insert("INSERT INTO org_scp(name,status) value (#{name},50 )")
    void addOrg(Org org);

    @Select("SELECT * FROM org_scp")
    List<Org> queryList();

    @Update("UPDATE org_scp SET status=#{status} WHERE id=#{id}")
    void updateIp(@Param("id") Integer id, @Param("status") Integer status);

    @Select("SELECT * FROM org_scp WHERE status = 50")
    List<Org> queryUseData();
}
